// 特殊作业

import {
    fitChartSize,
    fitSliderSizeHeight,
    fitSliderSizeWidth,
} from "@/utils/styleUtil.js";
import * as Echarts from "echarts";

let my_option = {
    columns1: [
        {
            label: "序号",
            prop: "title",
            width: "60",
            isSlot: true,
        },
        {
            label: "行业名称",
            prop: "col2",
            width: "100",
        },
        {
            label: "主管部门",
            prop: "col3",
        },
        {
            label: "",
            prop: "col4",
            width: "370",
            isSlot: true,
        },
        {
            label: "检测人员/从业人数",
            prop: "col5",
            width: "150",
        },
        {
            label: "检测率",
            prop: "col6",
            // isSlot: true,
        },
    ],
    columns2: [
        {
            label: "序号",
            prop: "title",
            width: "60",
        },
        {
            label: "企业名称",
            prop: "col2",
        },
        {
            label: "所属行业",
            prop: "col3",
        },
        {
            label: "员工人数",
            prop: "col4",
        },
    ],
    columns12: [
        {
            label: "姓名",
            prop: "title",
        },
        {
            label: "身份证",
            prop: "col2",
        },
        {
            label: "电话",
            prop: "col3",
        },
        {
            label: "标签",
            prop: "col4",
            isSlot: true,
        },
    ],
    columns14: [
        {
            label: "序号",
            prop: "title",
        },
        {
            label: "姓名",
            prop: "col2",
        },
        {
            label: "身份证号",
            prop: "col3",
        },
        {
            label: "手机号",
            prop: "col4",
        },
        {
            label: "标签",
            prop: "col5",
            isSlot: true,
        },
        {
            label: "未检测原因",
            prop: "col6",
        },
        {
            label: "确定未做",
            prop: "col7",
        },
        {
            label: "核实人",
            prop: "col8",
        },
        {
            label: "检测时间",
            prop: "col9",
        },
    ],
    extraOptionPie0: {
        title: {
            text: "94%",
            textStyle: {
                color: "#2DCCFF",
                fontSize: fitChartSize(40),
            },
            left: "center",
            top: "middle",
        },
        tooltip: {
            trigger: "item",
            position: [140, 10],
        },

        legend: {
            show: false,
        },
        color: [
            "#2DCCFF",
            "#EE9068",
            "rgba(42, 174, 250, 1)",
            "rgba(2, 113, 244, 1)",
            "rgba(26, 66, 142, 1)",
            "rgba(72, 140, 247, 1)",
            "rgba(56, 202, 251, 1)",
        ],
        series: [
            {
                radius: [fitChartSize(55), fitChartSize(75)],
                left: 0,
                name: "检测率",
                type: "pie",
                // roseType: "radius",
                top: "middle",
                // height: '33.33%',
                // width: 400,
                avoidLabelOverlap: false,
                selectedMode: "single", // 选中效果    multiple
                selectedOffset: 20, // 选中偏移量
                itemStyle: {
                    borderRadius: 0,
                    // borderColor: 'rgba(41, 49, 64, 0.4)',
                    borderWidth: 5,
                },
                label: {
                    show: false,
                    position: "outside",
                },
                emphasis: {
                    label: {
                        show: false,
                        fontSize: fitChartSize(14),
                        fontWeight: "400",
                        color: "#FFF",
                    },
                    itemStyle: {
                        shadowBlur: 10,
                        shadowOffsetX: 0,
                        shadowColor: "rgba(0, 0, 0, 0.5)",
                    },
                },
                labelLine: {
                    show: false,
                },
            },
        ],
    },
    extraOptionPie: {
        title: {
            text: "97.64%",
            textStyle: {
                color: "#2DCCFF",
                fontSize: fitChartSize(30),
            },
            left: "center",
            top: "middle",
        },
        tooltip: {
            trigger: "item",
            position: [140, 10],
        },

        legend: {
            show: false,
        },
        color: [
            "#2DCCFF",
            "#EE9068",
            "rgba(42, 174, 250, 1)",
            "rgba(2, 113, 244, 1)",
            "rgba(26, 66, 142, 1)",
            "rgba(72, 140, 247, 1)",
            "rgba(56, 202, 251, 1)",
        ],
        series: [
            {
                radius: [fitChartSize(60), fitChartSize(90)],
                // left: fitChartSize(-10),
                name: "核实完成率",
                type: "pie",
                // roseType: "radius",
                top: "middle",
                // height: '33.33%',
                // width: 400,
                avoidLabelOverlap: false,
                selectedMode: "single", // 选中效果    multiple
                selectedOffset: 20, // 选中偏移量
                itemStyle: {
                    borderRadius: 0,
                    // borderColor: 'rgba(41, 49, 64, 0.4)',
                    borderWidth: 5,
                },
                label: {
                    show: false,
                    position: "outside",
                },
                emphasis: {
                    label: {
                        show: false,
                        fontSize: fitChartSize(14),
                        fontWeight: "400",
                        color: "#FFF",
                    },
                    itemStyle: {
                        shadowBlur: 10,
                        shadowOffsetX: 0,
                        shadowColor: "rgba(0, 0, 0, 0.5)",
                    },
                },
                labelLine: {
                    show: false,
                },
            },
        ],
    },
    extraOptionPie2: {
        title: {
            text: "100%",
            textStyle: {
                color: "#2DCCFF",
                fontSize: fitChartSize(30),
            },
            left: "center",
            top: "middle",
        },
        tooltip: {
            trigger: "item",
            position: [140, 10],
        },

        legend: {
            show: false,
        },
        color: [
            "#2DCCFF",
            "#EE9068",
            "rgba(42, 174, 250, 1)",
            "rgba(2, 113, 244, 1)",
            "rgba(26, 66, 142, 1)",
            "rgba(72, 140, 247, 1)",
            "rgba(56, 202, 251, 1)",
        ],
        series: [
            {
                radius: [fitChartSize(60), fitChartSize(90)],
                // left: fitChartSize(-10),
                name: "核实完成率",
                type: "pie",
                // roseType: "radius",
                top: "middle",
                // height: '33.33%',
                // width: 400,
                avoidLabelOverlap: false,
                selectedMode: "single", // 选中效果    multiple
                selectedOffset: 20, // 选中偏移量
                itemStyle: {
                    borderRadius: 0,
                    // borderColor: 'rgba(41, 49, 64, 0.4)',
                    borderWidth: 5,
                },
                label: {
                    show: false,
                    position: "outside",
                },
                emphasis: {
                    label: {
                        show: false,
                        fontSize: fitChartSize(14),
                        fontWeight: "400",
                        color: "#FFF",
                    },
                    itemStyle: {
                        shadowBlur: 10,
                        shadowOffsetX: 0,
                        shadowColor: "rgba(0, 0, 0, 0.5)",
                    },
                },
                labelLine: {
                    show: false,
                },
            },
        ],
    },

    extraOptionsGauge: {
        tooltip: {
            formatter: (params, ticket, callback) => {
                return params.seriesName + ": " + params.value;
            },
        },
        series: [
            {
                type: "gauge",
                center: ["50%", "90%"],
                radius: fitChartSize(70),
                startAngle: 180,
                endAngle: 0,
                min: 0,
                max: 100,
                splitNumber: 4,
                itemStyle: {
                    color: "#2DCCFF",
                },
                progress: {
                    show: true,
                    width: 3,
                },
                pointer: {
                    show: false,
                },
                axisLine: {
                    lineStyle: {
                        width: 3,
                    },
                },
                axisTick: {
                    distance: 6,
                    splitNumber: 5,
                    lineStyle: {
                        width: 2,
                        color: "#ccc",
                    },
                },
                splitLine: {
                    distance: 7,
                    length: 11,
                    lineStyle: {
                        width: 3,
                        color: "#ccc",
                    },
                },
                axisLabel: {
                    distance: -52,
                    color: "#ccc",
                    fontSize: 16,
                },
                anchor: {
                    show: false,
                },
                title: {
                    show: false,
                },
                detail: {
                    valueAnimation: true,
                    width: "60%",
                    lineHeight: 40,
                    borderRadius: 8,
                    offsetCenter: [0, "-15%"],
                    fontSize: 20,
                    fontWeight: "bolder",
                    formatter: "{value} %",
                    color: "auto",
                },
            },
            {
                type: "gauge",
                center: ["50%", "90%"],
                radius: fitChartSize(80),
                startAngle: 180,
                endAngle: 0,
                min: 0,
                max: 100,
                itemStyle: {
                    color: "#2DCCFF",
                },
                progress: {
                    // distance: -16,
                    show: true,
                    width: 15,
                },
                pointer: {
                    show: false,
                },
                axisLine: {
                    show: false,
                },
                axisTick: {
                    show: false,
                },
                splitLine: {
                    show: false,
                },
                axisLabel: {
                    show: false,
                },
                detail: {
                    show: false,
                },
            },
        ],
    },
};

export { my_option };
